using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Values : MonoBehaviour
{
	private static Values instance;

	public List<string> names;

	public readonly string CharacterTag = "Character";

	public readonly string CollectibleTag = "Collectible";

	public readonly string WallTag = "Wall";

	public readonly string BubbleTag = "Bubble";

	public readonly string PerceptionTag = "Perception";

	[Header("Game Settings")]
	[SerializeField]
	private int areaSize;

	public readonly Vector3[] PlayerSpawnPositions = new Vector3[15]
	{
		new Vector3(13.42f, 68.09f, 0f),
		new Vector3(20.48f, 68.16f, 0f),
		new Vector3(25.9f, 55.7f, 0f),
		new Vector3(25.9f, 48.2f, 0f),
		new Vector3(37f, 48f, 0f),
		new Vector3(37f, 57.7f, 0f),
		new Vector3(51.6f, 57.7f, 0f),
		new Vector3(63.2f, 57.7f, 0f),
		new Vector3(63.2f, 67.4f, 0f),
		new Vector3(63.2f, 44.8f, 0f),
		new Vector3(63.2f, 32.5f, 0f),
		new Vector3(63.2f, 17.7f, 0f),
		new Vector3(45.3f, 17.7f, 0f),
		new Vector3(17.4f, 8.6f, 0f),
		new Vector3(13.3f, 13.6f, 0f)
	};

	[SerializeField]
	private float bigDamageRatio;

	[SerializeField]
	private float lightDamageRatio;

	[Header("Camera Settings")]
	[SerializeField]
	private float initialCameraSize;

	[SerializeField]
	private float maxCameraSize;

	private float lodDistance;

	[Header("Character Settings")]
	[SerializeField]
	private float characterMinSpeed;

	[SerializeField]
	private float characterMaxSpeed;

	[SerializeField]
	private float characterInitialSpeed;

	[SerializeField]
	private int boostConsumption;

	[SerializeField]
	private float magnetRange;

	[SerializeField]
	private float magnetGrowAmount;

	[SerializeField]
	private float hitForce;

	[SerializeField]
	private float dieAnimDuration;

	[Header("AI Settings")]
	[SerializeField]
	private float aiAvoidCollisionForce;

	[Header("Explosion Settings")]
	[SerializeField]
	private float explosionDuration;

	[Header("Wall Settings")]
	[SerializeField]
	private int wallDamage;

	[Header("Bubble Settings")]
	[SerializeField]
	private int bubbleAverageMass;

	[SerializeField]
	private int bubbleDeviationAmount;

	[Header("UI Settings")]
	[SerializeField]
	private CanvasScaler canvasScaler;

	private float canvasScale;

	[Header("Wanna Rate Popup Settings")]
	public RatePopupValues rate;

	[Header("Later Rate Settings")]
	public RatePopupValues laterRate;

	public static Values Instance
	{
		get
		{
			return instance;
		}
	}

	public string PlayerName
	{
		get
		{
			return PlayerPrefs.GetString("PlayerName", "你");
		}
		set
		{
			PlayerPrefs.SetString("PlayerName", value);
		}
	}

	public int AreaSize
	{
		get
		{
			return areaSize;
		}
	}

	public float BigDamageRatio
	{
		get
		{
			return bigDamageRatio;
		}
	}

	public float LightDamageRatio
	{
		get
		{
			return lightDamageRatio;
		}
	}

	public float InitialCameraSize
	{
		get
		{
			return initialCameraSize;
		}
	}

	public float MaxCameraSize
	{
		get
		{
			return maxCameraSize;
		}
	}

	public float LODDistance
	{
		get
		{
			return lodDistance;
		}
	}

	public float CharacterMinSpeed
	{
		get
		{
			return characterMinSpeed;
		}
	}

	public float CharacterMaxSpeed
	{
		get
		{
			return characterMaxSpeed;
		}
	}

	public float CharacterInitialSpeed
	{
		get
		{
			return characterInitialSpeed;
		}
	}

	public int BoostConsumption
	{
		get
		{
			return boostConsumption;
		}
	}

	public float MagnetRange
	{
		get
		{
			return magnetRange;
		}
	}

	public float MagnetGrowAmount
	{
		get
		{
			return magnetGrowAmount;
		}
	}

	public float HitForce
	{
		get
		{
			return hitForce;
		}
	}

	public float DieAnimDuration
	{
		get
		{
			return dieAnimDuration;
		}
	}

	public float AIAvoidCollisionForce
	{
		get
		{
			return aiAvoidCollisionForce;
		}
	}

	public float ExplosionDuration
	{
		get
		{
			return explosionDuration;
		}
	}

	public int WallDamage
	{
		get
		{
			return wallDamage;
		}
	}

	public int BubbleAverageMass
	{
		get
		{
			return bubbleAverageMass;
		}
	}

	public int BubbleDeviationAmount
	{
		get
		{
			return bubbleDeviationAmount;
		}
	}

	public CanvasScaler CanvasScaler
	{
		get
		{
			return canvasScaler;
		}
	}

	public float CanvasScale
	{
		get
		{
			return canvasScale;
		}
	}

	private void Awake()
	{
		if (instance == null)
		{
			instance = this;
		}
		else
		{
			UnityEngine.Object.Destroy(base.gameObject);
		}
		names = new List<string>();
		TextAsset textAsset = Resources.Load<TextAsset>("nickNames");
		string[] array = textAsset.text.Split(new char[2] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
		for (int i = 0; i < array.Length; i++)
		{
			names.Add(array[i]);
		}
		canvasScale = canvasScaler.referenceResolution.y / (float)Screen.height;
	}
}
